perl-file-rsyncp: update to 0.76
authorRosen Penev <[email protected]>
Fri, 1 Aug 2025 23:14:24 +0000 (16:14 -0700)
committerTianling Shen <[email protected]>
Thu, 14 Aug 2025 03:59:36 +0000 (11:59 +0800)
Fix compilation with GCC15.

Signed-off-by: Rosen Penev <[email protected]>
lang/perl/perl-file-rsyncp/Makefile
lang/perl/perl-file-rsyncp/patches/010-gcc15.patch [new file with mode: 0644]

index 588cb1df098d2029a086b98857b4ad9ecc9ce470..98943c2e7e96c12ea520b50f4048ad42535b08e4 100644 (file)
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-file-rsyncp
-PKG_VERSION:=0.74
+PKG_VERSION:=0.76
 PKG_RELEASE:=1
 
 PKG_SOURCE:=File-RsyncP-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://search.cpan.org/CPAN/authors/id/C/CB/CBARRATT/
-PKG_HASH:=ba4df5f9b0db6c9d86a6c5cf9861cf00d17b18e77cfa028e7a9157c0015a5aa3
+PKG_HASH:=1b23d3d4c08b9dd3eadfc6a3f38dfd21b72669f0052e7ad18e53350ef47c9e16
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-RsyncP-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Carsten Wolff <[email protected]>
diff --git a/lang/perl/perl-file-rsyncp/patches/010-gcc15.patch b/lang/perl/perl-file-rsyncp/patches/010-gcc15.patch
new file mode 100644 (file)
index 0000000..7df8c8f
--- /dev/null
@@ -0,0 +1,106 @@
+--- a/Digest/global.h
++++ b/Digest/global.h
+@@ -7,7 +7,7 @@ The following makes PROTOTYPES default t
+   been defined with C compiler flags.
+  */
+ #ifndef PROTOTYPES
+-#define PROTOTYPES 0
++#define PROTOTYPES 1
+ #endif
+ /* POINTER defines a generic pointer type */
+--- a/FileList/flist.c
++++ b/FileList/flist.c
+@@ -757,10 +757,12 @@ int u_strcmp(const char *cs1, const char
+  * XXX: This is currently the hottest function while building the file
+  * list, because building f_name()s every time is expensive.
+  **/
+-int file_compare(struct file_struct **file1, struct file_struct **file2)
++int file_compare(const void *fl1, const void *fl2)
+ {
+-    struct file_struct *f1 = *file1;
+-    struct file_struct *f2 = *file2;
++    const struct file_struct * const *file1 = fl1;
++    const struct file_struct * const *file2 = fl2;
++    const struct file_struct *f1 = *file1;
++    const struct file_struct *f2 = *file2;
+             
+     if (!f1->basename && !f2->basename)
+             return 0;
+@@ -860,8 +862,7 @@ void clean_flist(struct file_list *flist
+     if (!flist || flist->count == 0)
+         return;
+-    qsort(flist->files, flist->count,
+-        sizeof flist->files[0], (int (*)())file_compare);
++    qsort(flist->files, flist->count, sizeof flist->files[0], file_compare);
+     for (i = no_dups? 0 : flist->count; i < flist->count; i++) {
+         if (flist->files[i]->basename) {
+@@ -914,7 +915,7 @@ enum fnc_state { fnc_DIR, fnc_SLASH, fnc
+  * would do if it were operating on the joined strings.  We assume
+  * that there are no 0-length strings.
+  */
+-int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
++int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+ {
+     int dif;
+     const uchar *c1, *c2;
+--- a/FileList/hlink.c
++++ b/FileList/hlink.c
+@@ -20,10 +20,12 @@
+ #include "rsync.h"
+-static int hlink_compare(struct file_struct **file1, struct file_struct **file2)
++static int hlink_compare(const void *fl1, const void *fl2)
+ {
+-    struct file_struct *f1 = *file1;
+-    struct file_struct *f2 = *file2;
++    const struct file_struct * const *file1 = fl1;
++    const struct file_struct * const *file2 = fl2;
++    const struct file_struct *f1 = *file1;
++    const struct file_struct *f2 = *file2;
+     if (f1->F_DEV != f2->F_DEV)
+         return (int) (f1->F_DEV > f2->F_DEV ? 1 : -1);
+@@ -126,8 +128,7 @@ void init_hard_links(struct file_list *f
+         }
+     }
+-    qsort(hlink_list, hlink_count,
+-        sizeof hlink_list[0], (int (*)()) hlink_compare);
++    qsort(hlink_list, hlink_count, sizeof hlink_list[0], hlink_compare);
+     if (!hlink_count) {
+         free(hlink_list);
+--- a/FileList/pool_alloc.c
++++ b/FileList/pool_alloc.c
+@@ -9,7 +9,7 @@ struct alloc_pool
+       struct pool_extent      *live;          /* current extent for
+                                                * allocations          */
+       struct pool_extent      *free;          /* unfreed extent list  */
+-      void                    (*bomb)();
++      void                    (*bomb)(char*);
+                                               /* function to call if
+                                                * malloc fails         */
+       int                     flags;
+--- a/FileList/proto.h
++++ b/FileList/proto.h
+@@ -62,14 +62,14 @@ void send_file_name(int f, struct file_l
+                   int recursive, unsigned short base_flags);
+ struct file_list *send_file_list(int f, int argc, char *argv[]);
+ struct file_list *recv_file_list(int f);
+-int file_compare(struct file_struct **file1, struct file_struct **file2);
++int file_compare(const void *fl1, const void *fl2);
+ int flist_find(struct file_list *flist, struct file_struct *f);
+ void clear_file(int i, struct file_list *flist);
+ struct file_list *flist_new(int with_hlink, char *msg, int preserve_hard_links);
+ void flist_free(struct file_list *flist);
+ int flistDecodeBytes(struct file_list *f, unsigned char *bytes, uint32 nBytes);
+ void clean_flist(struct file_list *flist, int strip_root, int no_dups);
+-int f_name_cmp(struct file_struct *f1, struct file_struct *f2);
++int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2);
+ char *f_name_to(struct file_struct *f, char *fbuf);
+ char *f_name(struct file_struct *f);
+ void write_sum_head(int f, struct sum_struct *sum);